package com.trial.bean;
 class Student {
  private String username;
  private String password;
public Student(String username, String password) {
	this.username = username;
	this.password = password;
}

public String getUsername() {
	return username;
}

public void setUsername(String username) {
	this.username = username;
}

public String getPassword() {
	return password;
}

public void setPassword(String password) {
	this.password = password;
}


@Override
public String toString() {
	return "Student [username=" + username + ", password=" + password + "]";
}

}
 public class Person{
	 public static void main(String[] args) {
		Student student = new Student("yangyi","123");
	 System.out.println("打印对象:"+student);
	 student.setUsername("gorgeous");
	 System.out.println("打印对象的方法:"+student.getUsername());
	 
	}
 }
